package com.pkk.penguin.frame.know.springmvc.entity;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * @author peikunkun
 * @version V1.0
 * @Title: SpringMVCProject
 * @Package com.com.pkk.penguin.frame.know.springmvc.entity
 * @Description: <>
 * @date 2017/12/31 18:43
 */
/*@XmlRootElement表示元素根元素*/
@XmlRootElement
public class XmlEntity {

  private Integer id;
  private String xmlName;
  private String xmlValue;

  public Integer getId() {
    return id;
  }

  /*xml的元素，set方法上*/
  @XmlElement
  public void setId(Integer id) {
    this.id = id;
  }

  public String getXmlName() {
    return xmlName;
  }

  /*xml的元素，set方法上*/
  @XmlElement
  public void setXmlName(String xmlName) {
    this.xmlName = xmlName;
  }

  public String getXmlValue() {
    return xmlValue;
  }

  /*xml的元素，set方法上*/
  @XmlElement
  public void setXmlValue(String xmlValue) {
    this.xmlValue = xmlValue;
  }

  @Override
  public String toString() {
    return "XmlEntity{" +
        "id=" + id +
        ", xmlName='" + xmlName + '\'' +
        ", xmlValue='" + xmlValue + '\'' +
        '}';
  }
}
